
#include "Person.h"
#include "PersonFinery.h"
#include "FinerySneaker.h"
#include "FineryTrousers.h"
#include "FineryTShirt.h"
#include <iostream>
#include <memory>

using namespace npDecorator;
using namespace std;


void doDecorator()
{
    unique_ptr<Person> person(new Person("taoxing"));

    cout << "first decorator:" << endl;

    unique_ptr<PersonFinery> sneaker(new FinerySneaker());
    sneaker->decorate(person.get());
    unique_ptr<PersonFinery> trousers(new FineryTrousers());
    trousers->decorate(sneaker.get());
    unique_ptr<PersonFinery> tshirt(new FineryTShirt());
    tshirt->decorate(trousers.get());

    tshirt->show();
}